package cn.chiship.framework.upms.biz.system.pojo.dto;

import cn.chiship.framework.common.constants.TipConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 分类字典表单
 * 2022/4/1
 *
 * @author LiJian
 */
@ApiModel(value = "分类字典表单")
public class UpmsCategoryDictDto {
    @ApiModelProperty(value = "标题", required = true)
    @NotEmpty(message = "标题" + TipConstants.NOT_EMPTY)
    @Length(min = 1, max = 30)
    private String name;

    @ApiModelProperty(value = "所属上级", required = true)
    @NotEmpty(message = "所属上级" + TipConstants.NOT_EMPTY)
    @Length(min = 1, max = 36)
    private String pid;

    @ApiModelProperty(value = "排序", required = true)
    @NotNull(message = "排序" + TipConstants.NOT_EMPTY)
    @Min(1)
    @Max(99999)
    private Long orders;

    @ApiModelProperty(value = "所属类型", required = true)
    @NotEmpty(message = "所属类型" + TipConstants.NOT_EMPTY)
    @Length(min = 1, max = 50)
    private String type;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public Long getOrders() {
        return orders;
    }

    public void setOrders(Long orders) {
        this.orders = orders;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}